<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript" src="js/jquery-1.5.js"></script>
<script type="text/javascript">
	window.onload = function() {
		var div = document.getElementById("child");
		document.getElementById("more").onclick = function() {
			var fileInput = document.createElement("input");
			fileInput.setAttribute("type", "file");
			div.appendChild(fileInput);
			var cancelBtn = document.createElement("input");
			cancelBtn.setAttribute("type", "button");
			cancelBtn.setAttribute("value", "remove");
			cancelBtn.setAttribute("onclick", function() {
				div.removeChild(fileInput);
				div.removeChild(cancelBtn);
				div.removeChild(br);
			});
			div.appendChild(cancelBtn);
			var br = document.createElement("br");
			div.appendChild(br);
		};
	};
</script>
</head>
<body>
<form><input type="file"> <input id="more" type="button"
	value="more"> <br />
<div id="child"></div>
</form>
</body>
</html>